//file: ParticleSystem.h
//author: J.G.Yuan
//Date: 2006/8/28
//Desp: define the basic interface of partice system
#include <list>

#ifndef ParticleSystem_H_
#define ParticleSystem_H_

//declaration of class ParticleSystem
template<class T>
class ParticleSystem
{
protected:
	unsigned int m_maxNum;
	std::list<T> m_particleList;

public:
    ParticleSystem(){	
        m_maxNum    = 20000;
        m_particleList.clear();
    };   //default constructor
	virtual ~ParticleSystem(){ m_particleList.clear(); }; // destructor

	// interface list(pure virtual function)
	virtual bool InitSystem()=0;                //Initialize the specified system
	virtual void UpdateSystem()=0;				//Update properties of particles and the system
	virtual bool RenderSystem()=0;				//Use Opengl to render the system
	virtual bool DestroySystem()=0;				//Release the resources
	virtual bool ControlSystem(T ControlVar)=0;	//Interaction functions
};

#endif
